package nsip.model;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author nico
 */
public class ProductPriceInfo {

    private final int productID;
    private final int lowestPrice;
    private final int highestPrice;

    public ProductPriceInfo(int productID, int lowestPrice, int highestPrice) {
        this.productID = productID;
        this.lowestPrice = lowestPrice;
        this.highestPrice = highestPrice;
    }

    /**
     * @return the productID
     */
    public int getProductID() {
        return productID;
    }

    /**
     * @return the lowestPrice
     */
    public int getLowestPrice() {
        return lowestPrice;
    }

    /**
     * @return the highestPrice
     */
    public int getHighestPrice() {
        return highestPrice;
    }

    /**
     * @return the average price
     */
    public int getAveragePrice() {
        return (highestPrice + lowestPrice) / 2;
    }

    /**
     * @return the average price
     */
    public int getPriceSpectrum() {
        return (highestPrice - lowestPrice);
    }
}
